<?php
    
    session_start();
    
    if(!session_is_registered("logged")) {
	header("Location: login.php");
    }
    
    pg_connect("host=localhost port=5432 dbname=postgres user=name password=password");
    
?>